package com.qcby.hengxiang.learn.controller;

import com.qcby.hengxiang.learn.entity.Teacher;
import com.qcby.hengxiang.learn.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("teacher")
public class TeacherController {
    @Autowired
    private TeacherService teacherService;
    @ResponseBody
    @RequestMapping("getTeacher")
    public Teacher getTeacher(Integer id) {
        Teacher t = teacherService.getOne(id);
        return  t;
    }
}
